home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 9 / CDACTUAL9.iso / share / Dos / VARIOS / pascal / DELPHI.SWG / 0029_How to automate logon for paradox tables.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1996-02-21  |  684 b   |  19 lines

  1. {
  2. Password automation
  3.  
  4. Q:  I have a paradox table that uses a password.  How do I make it so
  5. that the form that uses the table comes up without prompting the user
  6. for the password?  
  7.  
  8. A:  The table component's ACTIVE property must be set to FALSE (If
  9. it is active before you have added the pasword, you will be prompted).
  10. Then, put this code in the handler for the form's OnCreate event:
  11.  
  12.   Session.AddPassword('My secret password');
  13.   Table1.Active := True;
  14.  
  15. Once you close the table, you can remove the password with 
  16. RemovePassword('My secret password'), or you can remove all current
  17. passwords with RemoveAllPasswords.  (Note: This is for Paradox tables
  18. only.)
  19.